package token

import (
	"chain_bridge_service/internal/pkg/core"
	"chain_bridge_service/internal/repository/mongodb/apply_token"
)

func (s *service) List(ctx core.Context, pageIndex uint, pageSize uint) (tokenList []apply_token.ApplyToken, err error) {
	model := apply_token.NewModel()
	list, err := model.List(s.db.GetDb(), pageIndex, pageSize)
	return list, err
}

func (s *service) Count(ctx core.Context) (count int64, err error) {
	model := apply_token.NewModel()
	num, err := model.Count(s.db.GetDb())
	return num, err
}
